home *** CD-ROM | disk | FTP | other *** search
- modifies ! parameter in callout.net
- Eight Ball #1 @6913 [Sub-board Host]
- 12/08/91 21:07:59 - Princeton, New Jersey
- /*
- * Eight Ball's Mod #44: Changes action of ! CALLOUT.NET parameter (see below)
- * 8BHOURS.MOD - Another [DSS] Presentation - 11/24/91
- */
-
- I finally crawled out of the hole they call college and wrote another mod.
- The idea had been floating around my head for a while, and it didn't seem like
- it would take all that long, and I needed a study break anyway.
-
- This mod should work with 4.20, but it was developed on 4.12. As usual, I make
- no guarantees about this mod so if it causes your system to call LD once every
- 5 minutes, I'm not going to be held responsible for it. Back up your source
- first.
-
- The way the ! parameter currently works is: If you have the !x parameter in
- the line for some node in your CALLOUT.NET, your node will try to call out
- once every 20/x hours (x has to be an integer) or just once every 20 hours if
- you omit the x and just put !.
-
- This always seemed counter-intuitive to me. With this mod, the !x parameter
- makes it call out once every x hours, which is more straightforward.
-
- First, backup your source files. (Usual disclaimer here)
-
- File: CONNECT1.C
- Function: void read_call_out_list()
-
- modify the line marked /*%%*/ as directed. Lines marked with /*==*/ are
- already there, and are included here to aid you in locating the proper section
- of code.
-
- /*==*/ case '!':
- /*==*/ con[cur_sys].options |= options_once_per_day;
- /*==*/ ++p;
- /*==*/ con[cur_sys].times_per_day=atoi(&(ss[p]));
- /*==*/ if (!con[cur_sys].times_per_day)
- /*%%*/ con[cur_sys].times_per_day=1; /* change 1 to 20 */
- /*==*/ break;
-
- This makes it so that if you just have ! it will only call out once every 20
- hours, so nothing will have changed.
-
- File: NETSUP.C
- Function: void attempt_callout()
-
- Delete the line marked with /*--*/ and replace it with the line marked /*++*/
- (or you can just modify the line marked with /*--*/ until it looks like the
- line marked with /*++*/)
-
- /*==*/ if (con[i].options & options_once_per_day) {
- /*--*/ if (labs(l-ncn[i2].lastcontactsent)<(20L*3600L/con[i].times_per_day))
- /*++*/ if (labs(l-ncn[i2].lastcontactsent)<(3600L*(long)con[i].times_per_day))
- /*==*/ ok=0;
- /*==*/ }
-
- Gosh, wasn't that simple?
-
- We're not quite done yet. Now you have to edit your CALLOUT.NET and change
- all the !x parameters to be the way you want them to be. If you had !2, that
- meant it would only try to call out once every 20/2=10 hours so you should
- change !2 to !10 now, and so on.
-
- Also, remember in the future that even though it says times_per_day, that
- number actually shows the number of hours to wait between calls. So don't
- get confused when you look at the code later.
-
- -8b [DSS]
- 11/24/91